{extend name="public/basic"}
{block name="main"}
    {auth:button rule="home/user/add_member" rules="$buttons"}
        <button type="button" class = "layui-btn layui-btn-success" action="dialog" action-url="{:url('add_member')}" action-title="新增会员">新增</button>
    {/auth:button}
    <table class="layui-table">
        <thead>
            <tr>
                <th>ID</th>
                <th>用户名</th>
                <th>邮箱/【昵称】</th>
                <th>性别</th>
                <th>积分</th>
                <th>金币</th>
                <!-- <th>第三方</th> -->
                <th>最后登录时间</th>
                <th>最后登录IP</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {volist name="list" id="vo"}
            <tr>
                <td>{$vo.user_id}</td>
                <td>{$vo.user_name}</td>
                <td>{$vo.email}/【{$vo.user_nicename}】</td>
                <td>{switch name="$vo['sex']"} {case value="1"}男{/case} {case value="2"}女{/case} {default /}保密 {/switch}
                </td>
                <td>{$vo.score}</td>
                <td>{$vo.coin}</td>
                <!-- <td></td> -->
                <td>{$vo.last_login_time}</td>
                <td>{$vo.last_login_ip}</td>
                <td>{if condition="$vo['status']=='1'"}
                    <span class="label label-success {if condition=" $vo[ 'user_id'] !='1' "}status{/if}" data-href="{:url('change_status_m','uid='.$vo['user_id'])}" data-status="1" data-id="{$vo.user_id}">启用</span> {else /}
                    <span class="label label-danger status" data-href="{:url('change_status_m','uid='.$vo['user_id'])}" data-status="0" data-id="{$vo.user_id}">停用</span> {/if}
                </td>
                <td>
                    {if condition="$vo['user_id'] neq '1'"}
                    {auth:button rule="home/user/recharge" rules="$buttons"}<i class="layui-icon layui-icon-note" action="dialog" action-url="{:url('recharge', ['uid'=>$vo['user_id']])}"></i>{/auth:button}
                    {auth:button rule="home/user/edit_member" rules="$buttons"}<i class="layui-icon layui-icon-edit" action="dialog" action-url="{:url('edit_member', ['uid'=>$vo['user_id']])}"></i>{/auth:button}
                    {auth:button rule="home/user/del_m" rules="$buttons"}<i class="layui-icon layui-icon-delete" action="del" action-url="{:url('del_m',['uid'=>$vo['user_id']])}" title="删除"></i>{/auth:button}
                    {/if}
                </td>
            </tr>
            {/volist}
        </tbody>
        <!-- tbody是必须的 -->
    </table>
    {$list->render()}
 {/block}
